﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.Architecture
{
    public interface INotificationObject : INotifyPropertyChanged
    {
    }


    public interface IViewModel : INotificationObject,/* IDispatcherable, ISupportView,*/ IDisposable
    {
        bool IsShared { get; }
        string CorrelationToken { get; }
        object Context { get; set; }
    }

    //public interface IViewModelMetadata
    //{
    //    string CorrelationToken { get; }
    //}

    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class ExportViewModelAttribute : ExportAttribute//, IViewModelMetadata
    {
        public ExportViewModelAttribute()
        {
        }

        public ExportViewModelAttribute(string token)
            : base(typeof(IViewModel))
        {
            CorrelationToken = token;
        }

        public string CorrelationToken { get; set; }
    }
}
